/*
 * @Author: SongXinxin
 * @Date: 2022-10-27 17:36:08
 * @LastEditors: Song Xinxin
 * @LastEditTime: 2022-11-07 22:08:49
 * @FilePath: \WYW_0419_Oasis\JavaScripts\GameStart.ts
 * @Description: 
 */
import * as odin from "odin"
import { UI } from "odin";
import { UIStart } from "./UI/UIStart";
import { ModuleC_Weapon, ModuleS_Weapon } from "./Modules/Weapon/Module_Weapon";
import { ModuleC_PlayerAttr, ModuleS_PlayerAttr } from "./Modules/PlayerAttr/Module_PlayerAttr";
import { Data_PlayerAttr } from "./Modules/PlayerAttr/Data_PlayerAttr";
import { ModuleC_NPC, ModuleS_NPC } from "./Modules/NPC/Module_NPC";
import { ModuleC_Skill, ModuleS_Skill } from "./Modules/Skill/Module_Skill";
import { Data_Skill } from "./Modules/Skill/Data_Skill";
import { ModuleC_Game, ModuleS_Game } from "./Modules/Game/Module_Game";
import { Data_Game } from "./Modules/Game/Data_Game";
import { ModuleC_Sound, ModuleS_Sound } from "./Modules/Sound/Module_Sound";
import { ModuleC_Dress, ModuleS_Dress } from "./Modules/Dress/Module_Dress";
import { Consts } from "./Consts";
@MWCore.MWClass
export default class GameStart extends odin.OdinGame
{
    @MWCore.MWProperty({displayName:"预加载"})
    preloadAssets:string = this.preloads;

    protected get preloads()
    {
        return  Consts.GUN_GUID+","+Consts.TRIGGER_GUID+","+Consts.NPC_GUID+","+
                Consts.Dress.Ragdoll.chara+","+Consts.Dress.Ragdoll.foot+","+Consts.Dress.Ragdoll.hair+","+Consts.Dress.Ragdoll.hand+","+Consts.Dress.Ragdoll.lower+","+Consts.Dress.Ragdoll.upper+","+
                Consts.Dress.Flamer.chara+","+Consts.Dress.Flamer.foot+","+Consts.Dress.Flamer.hair+","+Consts.Dress.Flamer.hand+","+Consts.Dress.Flamer.lower+","+Consts.Dress.Flamer.upper;
    }

    onStart(): void 
    {
        super.onStart();    
    }

    protected onRegisterModule(): void 
    {
        odin.ModuleManager.instance.register(ModuleS_PlayerAttr,ModuleC_PlayerAttr,Data_PlayerAttr);
        odin.ModuleManager.instance.register(ModuleS_Skill,ModuleC_Skill,Data_Skill);
        odin.ModuleManager.instance.register(ModuleS_Weapon,ModuleC_Weapon,null);
        odin.ModuleManager.instance.register(ModuleS_Dress,ModuleC_Dress,null);
        odin.ModuleManager.instance.register(ModuleS_NPC,ModuleC_NPC,null);
        odin.ModuleManager.instance.register(ModuleS_Sound,ModuleC_Sound,null);
        odin.ModuleManager.instance.register(ModuleS_Game,ModuleC_Game,Data_Game)

        if(GamePlay.isClient())
        {
            UI.instance.showPanel(UIStart);
        }
    }
}